import java.util.Scanner;

/**
 * @Author YuanYuan
 * @Date 2022/4/23
 * @Time 19:49
 */
public class TeseDemo {
    public static int MAX = 30;
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        System.out.print("奇数位：");
        for (int i = MAX; i >= 0; i-=2) {
            int ret = num >> i;
                System.out.print((ret&1)+" ");
        }
        System.out.print("偶数位：");
        for (int i = MAX - 1; i >= 0; i-=2) {
            int ret = num >> i;
            System.out.print((ret&1)+" ");
        }
    }
}
